package com.mingshashan.building.easy.core.controller;

import com.mingshashan.building.easy.core.service.ITestService;
import com.mingshashan.building.easy.core.vo.TestVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * TestController
 *
 * @author jasonxu
 */
@Api("test")
@RestController
@RequestMapping("tests")
public class TestController {

    @Autowired
    private ITestService testService;

    @ApiOperation("addTest")
    @PostMapping
    public TestVO addTest(@RequestBody TestVO testVO) {
        return testService.addTest(testVO);
    }

    @GetMapping
    public String hello() {
        return testService.hello();
    }

}
